﻿using D3StatsClient.Model;
using D3StatsClient.ViewModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace D3StatsClient.Commands
{
    public class StopRecordingSession : CommandBase
    {
        public override bool CanExecute(object parameter)
        {
            var vm = ViewModelManager<MainWindowViewModel>.ViewModel;

            if (vm.IsRecording)
            {
                return true;
            }

            return false;
        }

        public override void Execute(object parameter)
        {
            var vm = ViewModelManager<MainWindowViewModel>.ViewModel;
            vm.EndSession();
            
        }
    }
}
